package com.huayun.util;

import android.content.Context;


import com.huayun.util.utils.LogUtil;

/**
 * Description:
 * Created on 2018/4/16 11:44:04
 * author:Ahuangshang
 */

public class UtilInit {
    private static Context applicationContext;

    public static void init(Context context, boolean enable) {
        if (context == null) {
            applicationContext = null;
        } else {
            applicationContext = context.getApplicationContext();
        }
        LogUtil.enableLog(enable);
    }

    public static Context getApplicationContext() {
        if (applicationContext == null) {
            throw new RuntimeException("You used utilLibs before init");
        } else {
            return applicationContext;
        }
    }

}
